package view {
	import controller.signal.StateChangeSignal;
	
	import flash.events.MouseEvent;
	
	import mx.controls.Alert;
	
	import org.robotlegs.mvcs.Mediator;
	
	public class PublicViewMediator extends Mediator {
		
		[Inject] public var _view:PublicView;
		[Inject] public var stateChanged:StateChangeSignal;
		
		public override function onRegister():void {
			super.onRegister();
			_view.createBtn.addEventListener(MouseEvent.MOUSE_DOWN, onCreate);
		}
		
		private function onCreate(e:MouseEvent):void {
			stateChanged.dispatch();
		}
		
		public override function onRemove():void {
			super.onRemove();
			stateChanged.remove(onCreate);
		}
		
	}
}